package com.imooc.service.impl;

import com.imooc.dataobject.ProductInfo;
import com.imooc.dto.OrderDto;
import com.imooc.service.OrderService;
import com.imooc.service.ProductInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;

/**
 * @Author: xukang
 * @Date: 2020/6/10 10:53
 */
@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    private ProductInfoService productInfoService;
    @Override
    public OrderDto create(OrderDto orderDto) {
        //1.查询商品(库存,价格)

        //2.计算订单总价

        //3.订单表和订单详情表信息写入

        //4.扣库存
        return null;
    }

    @Override
    public OrderDto findOne(String orderId) {
        return null;
    }

    @Override
    public Page<OrderDto> findList(String buyerOpenid, Page page) {
        return null;
    }

    @Override
    public OrderDto cancle(OrderDto orderDto) {
        return null;
    }

    @Override
    public OrderDto finish(OrderDto orderDto) {
        return null;
    }

    @Override
    public OrderDto paid(OrderDto orderDto) {
        return null;
    }
}
